1.3. Responses
Requests return following status codes and JSON payloads:
· 200 (Success)
Request was successful. The JSON payload looks like this:
{
    “obj”: <license number, token, active(bool), registration date, unregistration date>,
    “shop”: <code, name, addresss, phone, registration date>,
    “device”: <fiscalID, name, addresss, phone, registration date>,
    “taxes”: <name, value, untaxed(bool), taxCode, taxIndex, calcType, taxBase, taxType, fullName>
}
There were validation errors (listed for each operation specifically). The JSON payload looks like this:
{
    “status”: “error”, “msgID” (optional): <msgID>, “message”: <list of validation errors>
}
· 500 (Internal Server Error):
Is returned in case of errors in JSON parsing (e.g., bad formats, wrong types) or other internal errors.
bank.postman_collection.json
{
    "info": {
        "_postman_id": "43e47fd4-e53b-4414-8785-380009258aa8",
        "name": "bank",
        "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
        "_exporter_id": "19160985"
    },
    "item": [
        {
            "name": "bank api",
            "item": [
                {
                    "name": "register_cashbox",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "931770cd12e949679fb8c1e91eec8d43"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-Requested-With",
                                "value": "XMLHttpRequest",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"country\":\"uas\", \"name\":\"Test bank api\", \"fiscal_id\":\"908908\", \"is_legal\": true, \"contact_name\":\" test\", \"region\":\"Львовская\", \"address\":\" test 1\", \"email\":\"[email protected]\", \r\n\"phone\":\"+38908908\", \"shop_name\": \"Shop 1\", \"shop_address\":\"test 1\", \"shop_type\":\"Shop\", \"license_num\":\"UAS45434749\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "{{host}}/register_cashbox/"
                    },
                    "response": [
                        {
                            "name": "register_cashbox",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-Requested-With",
                                        "value": "XMLHttpRequest",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"country\":\"uas\", \"name\":\"Test bank api\", \"fiscal_id\":\"908908\", \"is_legal\": true, \"contact_name\":\" test\", \"region\":\"Львовская\", \"address\":\" test 1\", \"email\":\"[email protected]\", \r\n\"phone\":\"+38908908\", \"shop_name\": \"Shop 1\", \"shop_address\":\"test 1\", \"shop_type\":\"Shop\", \"license_num\":\"UAS45434749\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": "{{host}}/register_cashbox/"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "html",
                            "header": [
                                {
                                    "key": "Server",
                                    "value": "nginx"
                                },
                                {
                                    "key": "Date",
                                    "value": "Thu, 20 Feb 2025 11:56:11 GMT"
                                },
                                {
                                    "key": "Content-Type",
                                    "value": "text/html; charset=utf-8"
                                },
                                {
                                    "key": "Transfer-Encoding",
                                    "value": "chunked"
                                },
                                {
                                    "key": "Connection",
                                    "value": "keep-alive"
                                },
                                {
                                    "key": "Vary",
                                    "value": "Accept-Encoding"
                                },
                                {
                                    "key": "Vary",
                                    "value": "Origin"
                                },
                                {
                                    "key": "X-Frame-Options",
                                    "value": "DENY"
                                },
                                {
                                    "key": "X-Frame-Options",
                                    "value": "DENY"
                                },
                                {
                                    "key": "Strict-Transport-Security",
                                    "value": "max-age=63072000; includeSubDomains; preload"
                                },
                                {
                                    "key": "X-Content-Type-Options",
                                    "value": "nosniff"
                                },
                                {
                                    "key": "Content-Encoding",
                                    "value": "gzip"
                                }
                            ],
                            "cookie": [],
                            "body": "Registration is success"
                        }
                    ]
                },
                {
                    "name": "create_terminal",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "931770cd12e949679fb8c1e91eec8d43"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "x-country-id",
                                "value": "7",
                                "type": "text",
                                "disabled": true
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"tid\":\"1111\", \"mid\":\"1111\", \"rs\":\"UA123\", \"mcc\":\"1233\", \"template_name\":\"Demo2.0\", \"processing_name\":\"PayPoc\", \"license_num\":\"UAS45434749\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "{{host}}/create_terminal/"
                    },
                    "response": [
                        {
                            "name": "create_terminal",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-Requested-With",
                                        "value": "XMLHttpRequest",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"tid\":\"1111\", \"mid\":\"1111\", \"rs\":\"UA123\", \"mcc\":\"1233\", \"template_name\":\"Demo2.0\", \"processing_name\":\"PayPoc\", \"license_num\":\"UAS45434749\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": "{{host}}/create_terminal/"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Date",
                                    "value": "Thu, 20 Feb 2025 11:04:28 GMT"
                                },
                                {
                                    "key": "Server",
                                    "value": "WSGIServer/0.2 CPython/3.9.10"
                                },
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                },
                                {
                                    "key": "X-Frame-Options",
                                    "value": "DENY"
                                },
                                {
                                    "key": "Content-Length",
                                    "value": "69"
                                },
                                {
                                    "key": "Vary",
                                    "value": "Origin"
                                }
                            ],
                            "cookie": [],
                            "body": "{\n    \"status\": \"success\",\n    \"terminal_id\": 1278,\n    \"config_version_id\": 4259\n}"
                        },
                        {
                            "name": "create_terminal errors",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-Requested-With",
                                        "value": "XMLHttpRequest",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"tid\":\"1111\", \"mid\":\"1111\", \"rs\":\"UA123\", \"mcc\":\"1233\",   \"license_num\":\"UAS45434749\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": "{{host}}/create_terminal/"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Date",
                                    "value": "Thu, 20 Feb 2025 11:06:48 GMT"
                                },
                                {
                                    "key": "Server",
                                    "value": "WSGIServer/0.2 CPython/3.9.10"
                                },
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                },
                                {
                                    "key": "X-Frame-Options",
                                    "value": "DENY"
                                },
                                {
                                    "key": "Content-Length",
                                    "value": "70"
                                },
                                {
                                    "key": "Vary",
                                    "value": "Origin"
                                }
                            ],
                            "cookie": [],
                            "body": "{\n    \"errors\": \" template_name is required. processing_name is required.\"\n}"
                        }
                    ]
                },
                {
                    "name": "activate_config",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "931770cd12e949679fb8c1e91eec8d43"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "x-country-id",
                                "value": "7",
                                "type": "text",
                                "disabled": true
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"tid\":\"1111\", \"mid\":\"1111\", \"rs\":\"UA123\", \"mcc\":\"1233\", \"template_name\":\"Demo2.0\", \"processing_name\":\"PayPoc\", \"license_num\":\"UAS45434749\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "{{host}}/terminals_config_versions/4262/activate/"
                    },
                    "response": [
                        {
                            "name": "create_terminal",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-Requested-With",
                                        "value": "XMLHttpRequest",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"tid\":\"1111\", \"mid\":\"1111\", \"rs\":\"UA123\", \"mcc\":\"1233\", \"template_name\":\"Demo2.0\", \"processing_name\":\"PayPoc\", \"license_num\":\"UAS45434749\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": "{{host}}/create_terminal/"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Date",
                                    "value": "Thu, 20 Feb 2025 11:04:28 GMT"
                                },
                                {
                                    "key": "Server",
                                    "value": "WSGIServer/0.2 CPython/3.9.10"
                                },
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                },
                                {
                                    "key": "X-Frame-Options",
                                    "value": "DENY"
                                },
                                {
                                    "key": "Content-Length",
                                    "value": "69"
                                },
                                {
                                    "key": "Vary",
                                    "value": "Origin"
                                }
                            ],
                            "cookie": [],
                            "body": "{\n    \"status\": \"success\",\n    \"terminal_id\": 1278,\n    \"config_version_id\": 4259\n}"
                        },
                        {
                            "name": "create_terminal errors",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "X-Requested-With",
                                        "value": "XMLHttpRequest",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"tid\":\"1111\", \"mid\":\"1111\", \"rs\":\"UA123\", \"mcc\":\"1233\",   \"license_num\":\"UAS45434749\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": "{{host}}/create_terminal/"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Date",
                                    "value": "Thu, 20 Feb 2025 11:06:48 GMT"
                                },
                                {
                                    "key": "Server",
                                    "value": "WSGIServer/0.2 CPython/3.9.10"
                                },
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                },
                                {
                                    "key": "X-Frame-Options",
                                    "value": "DENY"
                                },
                                {
                                    "key": "Content-Length",
                                    "value": "70"
                                },
                                {
                                    "key": "Vary",
                                    "value": "Origin"
                                }
                            ],
                            "cookie": [],
                            "body": "{\n    \"errors\": \" template_name is required. processing_name is required.\"\n}"
                        }
                    ]
                }
            ]
        }
    ]
}